<!DOCTYPE html>
<html>
<!--
Copyright 2012 The Closure Library Authors. All Rights Reserved.

Use of this source code is governed by the Apache License, Version 2.0.
See the COPYING file for details.
-->
<!--
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Closure Unit Tests - goog.labs.object</title>
<script src="../../base.js"></script>
<script>
  goog.require('goog.labs.object');
  goog.require('goog.testing.jsunit');
</script>
</head>
<body>
<script>
function testIs() {
  var object = {};
  assertTrue(goog.labs.object.is(object, object));
  assertFalse(goog.labs.object.is(object, {}));

  assertTrue(goog.labs.object.is(NaN, NaN));
  assertTrue(goog.labs.object.is(0, 0));
  assertTrue(goog.labs.object.is(1, 1));
  assertTrue(goog.labs.object.is(-1, -1));
  assertTrue(goog.labs.object.is(123, 123));
  assertFalse(goog.labs.object.is(0, -0));
  assertFalse(goog.labs.object.is(-0, 0));
  assertFalse(goog.labs.object.is(0, 1));

  assertTrue(goog.labs.object.is(true, true));
  assertTrue(goog.labs.object.is(false, false));
  assertFalse(goog.labs.object.is(true, false));
  assertFalse(goog.labs.object.is(false, true));

  assertTrue(goog.labs.object.is('', ''));
  assertTrue(goog.labs.object.is('a', 'a'));
  assertFalse(goog.labs.object.is('', 'a'));
  assertFalse(goog.labs.object.is('a', ''));
  assertFalse(goog.labs.object.is('a', 'b'));

  assertFalse(goog.labs.object.is(true, 'true'));
  assertFalse(goog.labs.object.is('true', true));
  assertFalse(goog.labs.object.is(false, 'false'));
  assertFalse(goog.labs.object.is('false', false));
  assertFalse(goog.labs.object.is(0, '0'));
  assertFalse(goog.labs.object.is('0', 0));
}
</script>
</body>
</html>
